<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	SettingForm form = (SettingForm)request.getAttribute("command");
	List<TblOaAuthRole> roleList = (List<TblOaAuthRole>)request.getAttribute("roleList");
%>

<div>
	<form id="userAddForm" target="_coreIframe"
		action="<%=request.getContextPath()%>/setting/doAddUser">
		<div class="breadcrumb">
			<div class="bcIcon"></div>
			<ul class="bcNav">
				<li>新建用户</li>
			</ul>
		</div>
		<table class="formTable">
			<tr>
				<td class="tdTitle">用户ID:</td>
				<td><input class="inputText xs" value="769160002" name="userId"></td>
			</tr>
			<tr>
				<td class="tdTitle">用户姓名:</td>
				<td><input class="inputText xs" type="text" name="userName" checkNull="true" value="张三" /></td>
			</tr>
			<!-- <tr>
				<td class="tdTitle">可选属性:</td>
				<td>
					<label for="setTop">
						<span style="color: #f89644;">置顶</span>
						<input id="setTop" type="checkbox" name="istop" value="1" />
					</label>
					<label for="setImportant">
						<span style="color: #e1544f;">重要</span>
						<input id="setImportant" type="checkbox" name="isimportant" value="1" />
					</label>
				</td>
			</tr> -->
			<tr>
				<td class="tdTitle">角色：</td>
				<td class="" colspan="2">
					<div style="padding-top:10px;padding-bottom:10px;">
						<div class="checkbox-wrap">
						<%
							if(!CollectionUtils.isEmpty(roleList)){
								for(TblOaAuthRole role:roleList){
									%>
									<div class="checkbox-wrap">
										<label>
											<input type="checkbox" data-value="1" value="<%=EncrypTool.encode(role.getRoleId()+"")%>" name="roles" class="checkbox" id="7801703" checked="checked">
											<span><%=role.getRoleDesc() %></span>
										</label>
									</div>
									<%
								}
							}
						%>
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td class="tdTitle"></td>
				<td>
					<div>
						<input class="input-btn-microsoft" type="submit" value="提交">
						<a class="a-btn-microsoft" href="javascript:XF.Setting.listUser()">取消</a>
					</div>
				</td>
			</tr>	
		</table>
	</form>
	<iframe id="_coreIframe" name="_coreIframe" style="display: none;"></iframe>
</div>